{extends file="../home.html"}
{block name="title"}{$head_title}{/block}
{block name="css"}
<link rel="stylesheet" type="text/css" href="/Public/Css/front/front_css/my_wallet.css">
<link href="__PUBLIC__/Css/front/css/zhonchou_home.css?version={$version}" type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/front/front_css/refresh_load.css?version={$version}"/>
<style type="text/css">

	body{
		background-color: #f3f3f3;
	}
	.menu{
		width: 100%;
		height: 2.45rem;
		background-color: #fff;
		border-bottom: 0.05rem solid #efefef;
	}
	.home_item{
		position: relative;
		top:0.05rem;
	padding: 0.75rem 0.6rem 0.65rem;
	background: #fff;
	border-bottom: 1px solid #EFEFEF;
	}
	#load_wrapper{
	margin-top: 4.75rem;
	}

	.head_tab{
		width:100%;
		height:2.5rem;
		border-bottom:1px solid #efefef;
		box-sizing:border-box;
		padding:0 0.55rem;
		display:flex;
		display:-webkit-flex;
		justify-content:space-between;
		-webkit-justify-content:space-between;
		align-items:center;
		-webkit-align-items:center;
		background-color: #fff;
	}
	.head_tab .normal{
		font-size:0.7rem;
		color:#909090;
		line-height:1.2rem;
		height:1.2rem;
		display:flex;
		display:-webkit-flex;
		align-items:center;
		-webkit-align-items:center;
		padding:0 0.7rem;
	}
	.head_tab .active_tab{
		background: #FF6600;
		border-radius: 100px;
		color:#fff;
	}
	.imgbox li img{
		height: 5.7rem;
		border-radius: 0;
	}
</style>
{/block}
{block name="content"}
<div class="title" style="margin-bottom:0">
	
	<div class="go_back"></div>
	<p><strong>我的帖子</strong></p>
</div>

<ul class="head_tab">
	<li class="normal active_tab" data-post_type="{PostModel::PRAISE}">赞赏帖</li>
	<li class="normal" data-post_type="{PostModel::CROWDFUNDING}">心愿帖</li>
	<li class="normal" data-post_type="{PostModel::REWARD}">悬赏帖</li>
	<li class="normal" data-post_type="{PostModel::NORMAL}">普通帖</li>
</ul>

<!--没有发帖时-->
 <div class="no_post" style="style="display: {if !$search_list}block{else}none{/if}">
	<div class="no_post_img"></div>
	<p>您还没有发表任何动态呢</p>
</div>


<div id="load_wrapper">
	<div id="scroller">
		<!-- <div id="pullDown">
		    <span class="pullDownIcon"></span>
		</div> -->

		<div class="home_list" id='new_list'>
			{foreach from=$post_list item=v}
			<div class="home_item">
				<div class="user_info clearfix">
					<a href="/FrontUserCenter/others_space/user_id/{$v.user_id}" class="avatar native_go">
						<img src="{$v.post_user.headimgurl}?imageView2/1/w/200/h/200/imageslim" alt="">
					</a>
					<div class="user_cont">
						<span class="nickname native_go" data-url="/FrontUserCenter/others_space/user_id/{$v.user_id}">{$v.post_user.nickname}</span>
						{foreach from=$v.post_user_title item=title}
						<i class="tag" style="background-color: {$title.title_color}">{$title.title_name}</i>
						{/foreach}
					</div>
				</div>
				<!-- 点击文字和图片跳转到详情页 -->
				<a class="native_go" href="/FrontChannel/post_detail/post_id/{$v.post_id}">
					<div class="item_title">
						{$v.title}
					</div>
					<div class="item_desc">
						{$v.content}
					</div>
					<ul class="imgbox clearfix">
						{foreach from=$v.imgs item=img key=k}
						{if $k < 5}
						<li {if !$img.is_show}class="blur"{/if}>
						<img src="{$img.img}?imageView2/1/w/200/h/200/imageslim" alt="">
						</li>
						{else}
						<li {if !$img.is_show}class="blur"{/if}>
						<div class="mask">
							<div class="txt">包含共{$v.img_count}张图</div>
						</div>
						<img src="{$img.img}?imageView2/1/w/200/h/200/imageslim" alt="">
						</li>
						{/if}
						{/foreach}
					</ul>
					{if $v.post_type == PostModel::NORMAL}<!-- 普通贴-->
					<div class="item_bot clearfix">
						<span class="time fl">{$v.addtime}</span>
						<span class="time fl">{$v.channel_name}</span>
						<span class="time fr">评论&nbsp;{$v.comment_num}</span>
						<span class="time fr">查看&nbsp;{$v.clickdot}}</span>
					</div>
					{elseif  $v.post_type == PostModel::PRAISE}<!-- 赞赏贴 -->
					<div class="item_bot clearfix">
						<span class="time fl">{$v.addtime}</span>
						<span class="time fl">查看&nbsp;{$v.clickdot}</span><span class="time fl">评论&nbsp;{$v.comment_num}</span>
						<span class="price fr">赞赏价：¥{$v.praise_price}</span>
						<span class="wan fr">{$v.avg_score}分</span>
					</div>
					{elseif $v.post_type == PostModel::REWARD}<!-- 悬赏贴 -->
					<div class="item_bot clearfix">
						<span class="time fl">{$v.addtime}</span>
						<span class="fl see">查看&nbsp;{$v.clickdot}</span>
						<span class="fl pl">评论&nbsp;{$v.comment_num}</span>
						<span class="price fr">悬赏价：¥{$v.reward_money}</span>
					</div>
					{elseif $v.post_type == PostModel::CROWDFUNDING}<!-- 心愿贴 -->
					<div class="item_bot clearfix">
						<span class="time fl">{$v.addtime}</span>
						<span class="price fr">心愿价：¥{$v.goal_money}</span>
						<span class="wan fr">已完成{$v.cf_rate}%</span>
					</div>
					{/if}
				</a>
			</div>
			{/foreach}
		</div>
			<div id="pullUp" {if !$post_list}style="display:none;"{/if}>
				<span class="pullUpIcon"></span><span class="pullUpLabel">上拉加载...</span>
			</div>
		</div>
	</div>


{/block}
{block name="js"}
<script type="text/javascript" src="__PUBLIC__/Js/front/iscroll.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/front/front_js/my_post_list.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/front/front_js/my_post.js"></script>
<script>
	var total = parseInt('{$total}')
	var firstRow =  parseInt('{$firstRow}')
	var post_type = parseInt('{PostModel::PRAISE}');

	var reward  = parseInt('{PostModel::REWARD}');
	var praise  = parseInt('{PostModel::PRAISE}');
	var crowdfunding = parseInt('{PostModel::CROWDFUNDING}');
	var normal = parseInt('{PostModel::NORMAL}');
</script>
{literal}
<script type="text/javascript">

	var home_banner = new Swiper('.home_banner',{
        pagination: '.swiper-pagination',
        paginationClickable: true,
        autoplay: 2000,//可选选项，自动滑动
    })

	$(function(){
		var imgw = $('.imgbox li').width();
		imgh = $('.imgbox li').height(imgw);

		// 百分比
		$('.line-inner').width($('.line-inner').attr("data-width")+"%")
	})
</script>
{/literal}
{/block}